//
//  MZFooterTableViewCell.m
//  OurTourism
//
//  Created by 孟镇 on 15/12/3.
//  Copyright © 2015年 Devil_Coming. All rights reserved.
//

#import "MZFooterTableViewCell.h"

@interface MZFooterTableViewCell ()

@property(nonatomic, strong) UILabel *titleLabel;
@property(nonatomic, strong) UILabel *detailLabel;

@end

@implementation MZFooterTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.titleLabel];
        
        self.detailLabel = [[UILabel alloc] init];
        self.detailLabel.font = [UIFont systemFontOfSize:12];
        self.detailLabel.numberOfLines = 0;
        [self.contentView addSubview:self.detailLabel];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.titleLabel.frame = CGRectMake(10, 6, 200, 20);
    
    self.detailLabel.frame = CGRectMake(10, 30, self.contentView.frame.size.width - 20, 40);
}

- (void)setTempDic:(NSDictionary *)tempDic
{
    if (_tempDic != tempDic) {
        
        NSArray *arr = [tempDic allKeys];
        self.titleLabel.text = arr[0];
        NSArray *arr1 = [tempDic allValues];
        self.detailLabel.text = arr1[0];
    }
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
